package com.wy2cloud.esdemo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.google.gson.GsonBuilder;
import io.searchbox.client.JestClient;
import io.searchbox.client.JestClientFactory;
import io.searchbox.client.config.HttpClientConfig;

@Configuration
public class JestConfig {

//    @Bean
//    public JestClient getJestClient() {
//
//        JestClientFactory factory = new JestClientFactory();
//        factory.setHttpClientConfig(new HttpClientConfig.Builder("http://localhost:9200")
//                .gson(new GsonBuilder().setDateFormat("yyyy-MM-dd'T'hh:mm:ss").create())
//                .connTimeout(10000)
//                .readTimeout(30000)
//                .multiThreaded(true)
//                .build());
//        return factory.getObject();
//    }
}
